﻿using UnityEngine;
using System.Collections;

public class TargetHit : MonoBehaviour 
{
	public bool bExists;
	public DoorController other;

	private GameObject target;
	
	void Awake () 
	{
		bExists = true;
		target = gameObject;
	
	}

	void Update()
	{
		if (!bExists) 
		{
			target.renderer.enabled = false;
			target.collider.enabled = false;
			other.UpdateCounter();
			bExists = true;
		}
	}
}
